1/27/2019

World Population 5-year Period Indicators Visualizer

This simple Shiny app makes use of the UN DESA World Population Prospects 2017 Period Indicators dataset. It produces a choropleth map for the selected period indicator and midperiod from the available 5-year periods starting from 1950-1955 (midPeriod: 1953) to 2095-2010 (midperiod: 2098).

The purpose of the app is to give a visualization of the period indicators for different countries that is easy to comprehend.

The Data Set

The dataset is from the United Nations DESA/Population Division website, and is downloadable from the following site: https://population.un.org/wpp/Download/Standard/CSV/

## 'data.frame':    8190 obs. of  25 variables:
##  $ LocID        : int  4 4 4 4 4 4 4 4 4 4 ...
##  $ Location     : Factor w/ 273 levels "Afghanistan",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ VarID        : int  2 2 2 2 2 2 2 2 2 2 ...
##  $ Variant      : Factor w/ 1 level "Medium": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Time         : Factor w/ 30 levels "1950-1955","1955-1960",..: 1 2 3 4 5 6 7 8 9 10 ...
##  $ MidPeriod    : num  1953 1958 1963 1968 1973 ...
##  $ TFR          : num  7.45 7.45 7.45 7.45 7.45 ...
##  $ NRR          : num  1.64 1.76 1.88 1.99 2.09 ...
##  $ CBR          : num  50.3 51 51.5 51.8 51.4 ...
##  $ Births       : num  2015 2202 2438 2725 3048 ...
##  $ LEx          : num  28.6 31.1 33.4 35.6 37.8 ...
##  $ LExMale      : num  27.9 30.4 32.7 34.9 37.1 ...
##  $ LExFemale    : num  29.4 32 34.2 36.4 38.7 ...
##  $ IMR          : num  280 255 234 216 198 ...
##  $ Q5           : num  406 374 346 321 296 ...
##  $ CDR          : num  36.9 33.7 31.2 28.8 26.4 ...
##  $ Deaths       : num  1477 1456 1476 1518 1564 ...
##  $ DeathsMale   : num  798 782 788 804 824 ...
##  $ DeathsFemale : num  679 674 689 714 740 ...
##  $ CNMR         : num  -0.499 -0.463 -0.423 -0.38 -0.337 ...
##  $ NetMigrations: num  -20 -20 -20 -20 -20 ...
##  $ GrowthRate   : num  1.29 1.68 1.99 2.26 2.47 ...
##  $ NatIncr      : num  13.4 17.3 20.3 22.9 25 ...
##  $ SRB          : num  1.06 1.06 1.06 1.06 1.06 1.06 1.06 1.06 1.06 1.06 ...
##  $ MAC          : num  29.8 29.8 29.8 29.8 29.8 ...

Using Plotly

In the choropleth map which will be produced using Plotly, you can hover over a country to view the period indicator data for that country, just like in the map shown below.

The Shiny Web App